#ifndef MUSIC_H
#define MUSIC_H

#include <QWidget>
#include <QThread>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include "common/statusvalue.h"
#include "common/common.h"
#include "database/musicdb.h"
#include "database/usersdb.h"

namespace Ui {
class Music;
}

class Music : public QWidget
{
    Q_OBJECT

public:
    explicit Music(QWidget *parent = 0);
    ~Music();

signals:
    void enterBegin();
    void enterPause();

public slots:
    void musicShow();

private slots:
    void on_toolButton_8_clicked();

    void on_toolButton_clicked();

    void showMusicName(int position);

    void on_toolButton_4_clicked();

    void on_toolButton_3_clicked();

    void on_toolButton_6_clicked();

    void on_toolButton_5_clicked();

    void on_toolButton_7_clicked();

private:
    Ui::Music *ui;
    MusicDB *musicdb;
    QList<QString> musicList;
    QMediaPlayer *player;
    QMediaPlaylist *playlist;

    void initMusic();

};

#endif // MUSIC_H
